<%@ page import="aiball.History" %>

<!doctype html>
<html>
<head>
	<title>Bundesliga</title>
</head>
<body>
	<div id="bundesligaPortal">
    	<div>
    		<h1>1. Bundesliga</h1>
			<table>
			<thead>
				<tr>
					<th>Platz</th>
					<th>Team</th>
					<th>Punkte</th>
				</tr>
			</thead>
			<tbody>
			<%platz=1%>
			<g:each in="${historyInstanceList}" status="j" var="historyInstance">
				<g:if test="${("[" + historyInstance.time.toString() + "]") == lastDate.toString()}">
					<tr class="${(j % 2) == 0 ? 'even' : 'odd'}">
						<td>${platz}</td>
						<td><g:link controller="team" action="showOtherTeam" id="${historyInstance?.team?.id}">${historyInstance?.team?.name.encodeAsHTML()}</g:link></td>
						<td>${historyInstance.points}</td>
					</tr>
					<%platz++%>
				</g:if>
			</g:each>
			</tbody>
			</table>
    	</div>
		<br>
		<br>
	</div>

</body>
</html>